package com.godyao.enums;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

/**
 * @author godyao
 * @date 2022/3/16
 */
@Data
@AllArgsConstructor
@Builder
public class ResultMsg {
    private Integer code;

    private String msg;

    private Object data;

    public ResultMsg() {
    }

    public ResultMsg(ResponseCodeEnum responseCodeEnum, Object data) {
        this.code = responseCodeEnum.getCode();
        this.msg = responseCodeEnum.getDesc();
        this.data = data;
    }
}
